#include <header.h>

int main(){
     int fd1 = open("1.txt", O_RDWR);
     int fd2 = open("2.txt", O_RDWR);

     while(1){

        char buf[100] = {0};
         ssize_t ret = 0;
         read(fd1, &ret, sizeof(ssize_t));
         int size = 0;
         while(size < ret){
            ssize_t c_ret = read(fd1, buf+size, sizeof(buf));

            size += c_ret;
         }
     }

     close(fd1);
     close(fd2);
    return 0;
}

